<?php
class Post_MediaController extends Zendvn_Controller_Action{
	
	public function init(){
		parent::init();
		$this->view->main = TRUE;
		
	}
	
	public function indexAction(){
	
	}
	
	public function updateAction(){
		
		if ($this->getRequest()->isPost()){
			
			$idmedia = $_POST["idmedia"];
			
			
			$storage = new Zend_Auth_Storage_Session();
			$data = $storage->read();
			$media = new Post_Model_Media();
			if(isset($idmedia)){
				
				$arr = array(
						"id"=>$idmedia,
						"userid"=>$data->id,						
						"postid"=>0,										
				);	
				
				$media->updateMedia($arr);
			}
			
		}
	}
	
}